Integrand size = 35, antiderivative size = 246 \[ \int \frac {(a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=-\frac {4 a^3 (27 A+17 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {4 a^3 (21 A+11 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {8 a^3 (21 A+16 C) \sin (c+d x)}{105 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {4 a^3 (27 A+17 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)}}+\frac {2 C (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {4 C \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 (63 A+73 C) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d \cos ^{\frac {5}{2}}(c+d x)} \]
[Out]
Time = 0.77 (sec) , antiderivative size = 246, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.257, Rules used = {4199, 3123, 3054, 3047, 3100, 2827, 2716, 2719, 2720} \[ \int \frac {(a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {4 a^3 (21 A+11 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}-\frac {4 a^3 (27 A+17 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {8 a^3 (21 A+16 C) \sin (c+d x)}{105 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 (63 A+73 C) \sin (c+d x) \left (a^3 \cos (c+d x)+a^3\right )}{315 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {4 a^3 (27 A+17 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)}}+\frac {4 C \sin (c+d x) \left (a^2 \cos (c+d x)+a^2\right )^2}{21 a d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 C \sin (c+d x) (a \cos (c+d x)+a)^3}{9 d \cos ^{\frac {9}{2}}(c+d x)} \]
[In]
[Out]
Rule 2716
Rule 2719
Rule 2720
Rule 2827
Rule 3047
Rule 3054
Rule 3100
Rule 3123
Rule 4199
Rubi steps \begin{align*} \text {integral}& = \int \frac {(a+a \cos (c+d x))^3 \left (C+A \cos ^2(c+d x)\right )}{\cos ^{\frac {11}{2}}(c+d x)} \, dx \\ & = \frac {2 C (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {2 \int \frac {(a+a \cos (c+d x))^3 \left (3 a C+\frac {1}{2} a (9 A+C) \cos (c+d x)\right )}{\cos ^{\frac {9}{2}}(c+d x)} \, dx}{9 a} \\ & = \frac {2 C (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {4 C \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d \cos ^{\frac {7}{2}}(c+d x)}+\frac {4 \int \frac {(a+a \cos (c+d x))^2 \left (\frac {1}{4} a^2 (63 A+73 C)+\frac {1}{4} a^2 (63 A+13 C) \cos (c+d x)\right )}{\cos ^{\frac {7}{2}}(c+d x)} \, dx}{63 a} \\ & = \frac {2 C (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {4 C \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 (63 A+73 C) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {8 \int \frac {(a+a \cos (c+d x)) \left (\frac {9}{2} a^3 (21 A+16 C)+\frac {3}{4} a^3 (63 A+23 C) \cos (c+d x)\right )}{\cos ^{\frac {5}{2}}(c+d x)} \, dx}{315 a} \\ & = \frac {2 C (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {4 C \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 (63 A+73 C) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {8 \int \frac {\frac {9}{2} a^4 (21 A+16 C)+\left (\frac {9}{2} a^4 (21 A+16 C)+\frac {3}{4} a^4 (63 A+23 C)\right ) \cos (c+d x)+\frac {3}{4} a^4 (63 A+23 C) \cos ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x)} \, dx}{315 a} \\ & = \frac {8 a^3 (21 A+16 C) \sin (c+d x)}{105 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 C (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {4 C \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 (63 A+73 C) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {16 \int \frac {\frac {63}{8} a^4 (27 A+17 C)+\frac {45}{8} a^4 (21 A+11 C) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x)} \, dx}{945 a} \\ & = \frac {8 a^3 (21 A+16 C) \sin (c+d x)}{105 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 C (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {4 C \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 (63 A+73 C) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {1}{21} \left (2 a^3 (21 A+11 C)\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx+\frac {1}{15} \left (2 a^3 (27 A+17 C)\right ) \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)} \, dx \\ & = \frac {4 a^3 (21 A+11 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {8 a^3 (21 A+16 C) \sin (c+d x)}{105 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {4 a^3 (27 A+17 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)}}+\frac {2 C (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {4 C \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 (63 A+73 C) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d \cos ^{\frac {5}{2}}(c+d x)}-\frac {1}{15} \left (2 a^3 (27 A+17 C)\right ) \int \sqrt {\cos (c+d x)} \, dx \\ & = -\frac {4 a^3 (27 A+17 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {4 a^3 (21 A+11 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {8 a^3 (21 A+16 C) \sin (c+d x)}{105 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {4 a^3 (27 A+17 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)}}+\frac {2 C (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {4 C \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 (63 A+73 C) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d \cos ^{\frac {5}{2}}(c+d x)} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 12.85 (sec) , antiderivative size = 1135, normalized size of antiderivative = 4.61 \[ \int \frac {(a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {\cos ^{\frac {11}{2}}(c+d x) \sec ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \left (\frac {(27 A+17 C) \csc (c) \sec (c)}{15 d}+\frac {C \sec (c) \sec ^5(c+d x) \sin (d x)}{18 d}+\frac {\sec (c) \sec ^4(c+d x) (7 C \sin (c)+27 C \sin (d x))}{126 d}+\frac {\sec (c) \sec ^3(c+d x) (135 C \sin (c)+63 A \sin (d x)+238 C \sin (d x))}{630 d}+\frac {\sec (c) \sec (c+d x) (105 A \sin (c)+110 C \sin (c)+378 A \sin (d x)+238 C \sin (d x))}{210 d}+\frac {\sec (c) \sec ^2(c+d x) (63 A \sin (c)+238 C \sin (c)+315 A \sin (d x)+330 C \sin (d x))}{630 d}\right )}{A+2 C+A \cos (2 c+2 d x)}-\frac {A \cos ^5(c+d x) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\arctan (\cot (c)))\right ) \sec ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \sec (d x-\arctan (\cot (c))) \sqrt {1-\sin (d x-\arctan (\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\arctan (\cot (c)))} \sqrt {1+\sin (d x-\arctan (\cot (c)))}}{d (A+2 C+A \cos (2 c+2 d x)) \sqrt {1+\cot ^2(c)}}-\frac {11 C \cos ^5(c+d x) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\arctan (\cot (c)))\right ) \sec ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \sec (d x-\arctan (\cot (c))) \sqrt {1-\sin (d x-\arctan (\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\arctan (\cot (c)))} \sqrt {1+\sin (d x-\arctan (\cot (c)))}}{21 d (A+2 C+A \cos (2 c+2 d x)) \sqrt {1+\cot ^2(c)}}+\frac {9 A \cos ^5(c+d x) \csc (c) \sec ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\arctan (\tan (c)))\right ) \sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\arctan (\tan (c)))} \sqrt {1+\cos (d x+\arctan (\tan (c)))} \sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{10 d (A+2 C+A \cos (2 c+2 d x))}+\frac {17 C \cos ^5(c+d x) \csc (c) \sec ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\arctan (\tan (c)))\right ) \sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\arctan (\tan (c)))} \sqrt {1+\cos (d x+\arctan (\tan (c)))} \sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{30 d (A+2 C+A \cos (2 c+2 d x))} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(1218\) vs. \(2(274)=548\).
Time = 4.79 (sec) , antiderivative size = 1219, normalized size of antiderivative = 4.96
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.12 (sec) , antiderivative size = 279, normalized size of antiderivative = 1.13 \[ \int \frac {(a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=-\frac {2 \, {\left (15 i \, \sqrt {2} {\left (21 \, A + 11 \, C\right )} a^{3} \cos \left (d x + c\right )^{5} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 15 i \, \sqrt {2} {\left (21 \, A + 11 \, C\right )} a^{3} \cos \left (d x + c\right )^{5} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 21 i \, \sqrt {2} {\left (27 \, A + 17 \, C\right )} a^{3} \cos \left (d x + c\right )^{5} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 21 i \, \sqrt {2} {\left (27 \, A + 17 \, C\right )} a^{3} \cos \left (d x + c\right )^{5} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - {\left (42 \, {\left (27 \, A + 17 \, C\right )} a^{3} \cos \left (d x + c\right )^{4} + 15 \, {\left (21 \, A + 22 \, C\right )} a^{3} \cos \left (d x + c\right )^{3} + 7 \, {\left (9 \, A + 34 \, C\right )} a^{3} \cos \left (d x + c\right )^{2} + 135 \, C a^{3} \cos \left (d x + c\right ) + 35 \, C a^{3}\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )\right )}}{315 \, d \cos \left (d x + c\right )^{5}} \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=a^{3} \left (\int \frac {A}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {3 A \sec {\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {3 A \sec ^{2}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {A \sec ^{3}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {C \sec ^{2}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {3 C \sec ^{3}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {3 C \sec ^{4}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {C \sec ^{5}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx\right ) \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{3}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{3}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Time = 21.36 (sec) , antiderivative size = 308, normalized size of antiderivative = 1.25 \[ \int \frac {(a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {2\,A\,a^3\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {70\,C\,a^3\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {9}{4},\frac {1}{2};\ -\frac {5}{4};\ {\cos \left (c+d\,x\right )}^2\right )+270\,C\,a^3\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {7}{4},\frac {1}{2};\ -\frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )+210\,C\,a^3\,{\cos \left (c+d\,x\right )}^3\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+378\,C\,a^3\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{315\,d\,{\cos \left (c+d\,x\right )}^{9/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {6\,A\,a^3\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {2\,A\,a^3\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {2\,A\,a^3\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{5\,d\,{\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]
[In]
[Out]